#include "stdafx.h"
#include "EsClientNetwork.h"

void EsClientNetwork::onConnect(EssConnector* connector)
{
	mLog += "Server connect OK.\n";
}

bool EsClientNetwork::onReceive(EssConnector* connector)
{
	mLog += "Received msg: ";
	mLog.append((const char*)connector->getRecvBuffer().base(), connector->getRecvBuffer().size());
	mLog += "\n";
	return true;
}

void EsClientNetwork::onConnectFailed(EssConnector* connector)
{
	mLog += "Connecting server failed.\n";
}

void EsClientNetwork::onDisconnect(EssConnector* connector)
{
	mLog += "Server disconnect.\n";
}